893bac43ed5ffb83c36cd2b02bcbff2213484ea9,security/subsystem/src/main/java/org/jboss/as/security/SecurityDomainReloadAddHandler.java,SecurityDomainReloadAddHandler,removeServices,#OperationContext#ServiceName#ModelNode#,52

Before Change


    protected void removeServices(final OperationContext context, final ServiceName parentService, final ModelNode parentModel) throws OperationFailedException {
        super.removeServices(context, parentService, parentModel);
        // make sure the security realm service is also removed.
        ServiceName serviceName = Capabilities.SECURITY_REALM_RUNTIME_CAPABILITY.getCapabilityServiceName(parentService.getSimpleName());
        context.removeService(serviceName);
    }
}

After Change


    protected void removeServices(final OperationContext context, final ServiceName parentService, final ModelNode parentModel) throws OperationFailedException {
        super.removeServices(context, parentService, parentModel);
        // make sure the security realm service is also removed.
        ModelNode elytronRealm = SecurityDomainResourceDefinition.EXPORT_ELYTRON_REALM.resolveModelAttribute(context, parentModel);
        if (elytronRealm.isDefined()) {
            ServiceName serviceName = Capabilities.SECURITY_REALM_RUNTIME_CAPABILITY.getCapabilityServiceName(elytronRealm.asString());
            context.removeService(serviceName);
        }
    }
}